package com.briup.cms.dao;

/**
 * @program: Consult_Management_Syetem1
 * @description:
 * @author: 马海兰
 * @create: 2020-07-02*
 **/

import com.briup.cms.bean.Notes;
import com.briup.cms.bean.Privilege;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface PrivilegeMapper {
    @Select("select * from cms_privilege")
    List<Privilege> selectAll();
    @Insert("insert into cms_privilege values(null #{name},#{icon},#{type},#{path},#{introduce},#{isHidden},#{prantId})")
    int insert(Privilege privilege);
    @Update("update cms_privilege set name=#{name},icon=#{icon},type=#{type},path=#{path},introduce=#{introduce},is_Hidden=#{isHidden},parent_id=#{prantId} where id=#{id}")
    int update(Privilege privilege);
    @Delete("delete from cms_privilege where id=#{id}")
    int deleteById(long id);
}
